home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir30 / l2c-19.zip / QDIM.TXT < prev    next >
Lisp/Scheme  |  1993-06-25  |  3KB  |  66 lines

  1. 01.20.93
  2.  
  3. QDIM was written to help our AutoCAD users draw dimensions without
  4. having to worry about all those sticky dimvars.  We just set up a few
  5. aptly named dimstyles, and off they went.  It started life over a year
  6. ago as a short little program to draw guidelines while dimensioning and set
  7. dimstyles.  Release 12 now "ghosts" in dimensions while you draw, so I've had 
  8. to keep up with the times.  It has since turned into the behemoth you now 
  9. possess.
  10.  
  11. Thus, I submit this to the public realm primarily for its (hopeful)
  12. usefulness, but also to invite comment and criticism.  Not having had any
  13. formal programming instruction, I am curious to know how I might write
  14. more "elegant" and efficient code.
  15.  
  16. I have not included any "manual" as such, but the concept is this:
  17. Pick two points, just like a normal DIM command.  Then, based upon the
  18. location of the third point, a VERTical, HORizontal or ALIgned dimension
  19. is drawn.  At any point during this process, pressing button 1 (a white
  20. button for us) brings up a dialog box to select layer, dimstyle, and a few
  21. other things.  Button 2 brings up the standard osnap selections.
  22.  
  23. For layer selection, only the current layer and layers containing 'DIM' in
  24. their names are presented as choices.  This can, of course, be changed.  A
  25. "baseline" feature is included, which works like this:  when a dimension is
  26. specified, an imaginary line is established through the dimension line.
  27. During subsequent QDIMs, moving near this imaginary line snaps the cursor to
  28. it.  This makes strings of dimensions easier to draw.  Dimensions can be
  29. specifed as baselines by noun/verb QDIMing, or by using the PICK button within
  30. the dialogue box, or...the "follow" feature re-establishes this line each time
  31. QDIM is used.
  32.  
  33. Bear in mind that this was written for an architectural firm, and may
  34. required some modification for use with other disciplines.  For us
  35. architects it converts anything less than 4'-0" into inches, and it adds
  36. "CLR." to the end of 44"...it's a Title 24 thing.  It also offers MIN.,
  37. CLR. and EQ. to modify the dimension string.  All of this can be changed
  38. with a little programming.
  39.  
  40. I have commented out a few lines toward the end of the main C:qdim function,
  41. which set text style just prior to drawing the dimension.  Change these to
  42. your own text style, and uncomment them.  I make references to white and blue 
  43. buttons, which you may wish to change to suit your pointing device.  Also, QDIM 
  44. reads your menu file to determine your POP0 configuration.  If your osnaps
  45. aren't there, you may wish to alter the portion of code in (setup) to match
  46. your menu file, or just hard-code the variable 'snlist' to match your osnaps,
  47. e.g. (setq snlist (list "NEA" "PER" "INT" ...))
  48.  
  49. At the tail end of the file is an auto-run feature.  My acad.lsp file includes
  50. the following:
  51.  
  52. (defun C:qdim ()
  53.     (setq AUTO_RUN T)
  54.     (load "qdim")
  55. );defun
  56.  
  57. so that QDIM is always available as a command.
  58.  
  59.  
  60. I hope this proves useful to someone out there.  Please feel free to comment:
  61.  
  62. Raymond Bradley, CIS 71165,2764
  63. c/o Fitschen & Associates
  64. 1855 Gateway Blvd., Ste 370
  65. Concord, CA  94520
  66.